Alan Acurry reports that Mapsned hoses if you edit a file with a comment
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sat, 12 Jul 2003 04:46:35 +0000 (04:46 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sat, 12 Jul 2003 04:46:35 +0000 (04:46 +0000)
that's > 30 chars, so we truncate them here.

gpsbabel/mapsend.c

index 4ea1553e35c55ca6e47df67156b60ae80356bb94..f0dba1a569e5a62ae6f22b7fc7390a6c5ac4affa 100644 (file)
@@ -411,6 +411,8 @@ mapsend_waypt_pr(const waypoint *waypointp)
                c = strlen(waypointp->description);
        else
                c = 0;
+
+       if (c > 30) c = 30;
        fwrite(&c, 1, 1, mapsend_file_out);
        fwrite(waypointp->description, c, 1, mapsend_file_out);